package plantshop.tests;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import plantshop.model.Location;

public class LocationTest {
	
	Location test;

	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
	}

	@AfterClass
	public static void tearDownAfterClass() throws Exception {
	}

	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void test() {
		test = new Location(300,500);
		assertEquals(300,test.getX());
		assertEquals(500,test.getY());
		assertTrue(test.equals(new Location(300,500)));
		assertFalse(test.equals(new Location(1,2)));
		assertFalse(test.equals(new Location(300,1)));
		assertFalse(test.equals(new Object()));
		
		
		assertEquals(test.clone(),test);
		
	}

}
